﻿using System;
using System.Threading.Tasks;

namespace Qy.Core;

public interface ICacheManager
{
    void Set<T>(string key, T value, TimeSpan timeSpan);
    Task SetAsync<T>(string key, T value, TimeSpan timeSpan);
    T Get<T>(string cacheKey);
    Task<T> GetAsync<T>(string cacheKey);
    string GetValue(string key);
    Task<string> GetValueAsync(string key);
    void Remove(string cacheKey);
    Task RemoveAsync(string cacheKey);
}

